MAXM = 3
MAXN = 3
A = [[1,0,0],[0,1,1],[0,1,1]] 
B = [[1,0,1],[0,1,1],[1,1,1]] 
C = [[0]*MAXM for _ in range(MAXN)]
def dis_Array(array):
    for i in range(len(array)):
        for j in range(len(array[0])):
            print(array[i][j], end=" ")
        print()

def compression(array,list):
    i = j = 0
    while i < len(array):
        j = 0
        while j <= i:
            list.append(array[i][j])
            j += 1
        i += 1     

def mul(a, b, n = 0):
    sum_list =[]
    sum = num = 0
    for i in range(n):
        sum_list.append(sum)
        num += 1
        sum += num
    print(sum_list)
    for j in range(n):
        for i in range(j, n):
            for idx in sum_list:
                C[i][j] += a[idx + i]*b[idx + j]
    
    for i in range(n):
        for j in range(n-1, i, -1):
            C[i][j] = C[j][i]


if __name__ == "__main__":
    dis_Array(A)
    dis_Array(B)
    A_list = []
    B_list = []
    compression(A, A_list)
    compression(B, B_list)
    print(A_list, B_list)
    mul(A_list, B_list, n = len(A))
    print(C)
    